3.257 \(\int \frac {1}{-1+a+a x^2} \, dx\)

Optimal. Leaf size=30 \[ -\frac {\tanh ^{-1}\left (\frac {\sqrt {a} x}{\sqrt {1-a}}\right )}{\sqrt {(1-a) a}} \]

[Out]

-arctanh(x*a^(1/2)/(1-a)^(1/2))/((1-a)*a)^(1/2)

________________________________________________________________________________________

Rubi [A]  time = 0.03, antiderivative size = 30, normalized size of antiderivative = 1.00, number of steps used = 1, number of rules used = 1, integrand size = 10, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.100, Rules used = {208} \[ -\frac {\tanh ^{-1}\left (\frac {\sqrt {a} x}{\sqrt {1-a}}\right )}{\sqrt {(1-a) a}} \]

Antiderivative was successfully verified.

[In]

Int[(-1 + a + a*x^2)^(-1),x]

[Out]

-(ArcTanh[(Sqrt[a]*x)/Sqrt[1 - a]]/Sqrt[(1 - a)*a])

Rule 208

Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(Rt[-(a/b), 2]*ArcTanh[x/Rt[-(a/b), 2]])/a, x] /; FreeQ[{a,
b}, x] && NegQ[a/b]

Rubi steps

\begin {align*} \int \frac {1}{-1+a+a x^2} \, dx &=-\frac {\tanh ^{-1}\left (\frac {\sqrt {a} x}{\sqrt {1-a}}\right )}{\sqrt {(1-a) a}}\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]  time = 0.01, size = 28, normalized size = 0.93 \[ \frac {\tan ^{-1}\left (\frac {\sqrt {a} x}{\sqrt {a-1}}\right )}{\sqrt {a-1} \sqrt {a}} \]

Antiderivative was successfully verified.

[In]

Integrate[(-1 + a + a*x^2)^(-1),x]

[Out]

ArcTan[(Sqrt[a]*x)/Sqrt[-1 + a]]/(Sqrt[-1 + a]*Sqrt[a])

________________________________________________________________________________________

fricas [A]  time = 0.83, size = 82, normalized size = 2.73 \[ \left [-\frac {\sqrt {-a^{2} + a} \log \left (\frac {a x^{2} - 2 \, \sqrt {-a^{2} + a} x - a + 1}{a x^{2} + a - 1}\right )}{2 \, {\left (a^{2} - a\right )}}, \frac {\arctan \left (\frac {\sqrt {a^{2} - a} x}{a - 1}\right )}{\sqrt {a^{2} - a}}\right ] \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(1/(a*x^2+a-1),x, algorithm="fricas")

[Out]

[-1/2*sqrt(-a^2 + a)*log((a*x^2 - 2*sqrt(-a^2 + a)*x - a + 1)/(a*x^2 + a - 1))/(a^2 - a), arctan(sqrt(a^2 - a)
*x/(a - 1))/sqrt(a^2 - a)]

________________________________________________________________________________________

giac [A]  time = 0.58, size = 23, normalized size = 0.77 \[ \frac {\arctan \left (\frac {a x}{\sqrt {a^{2} - a}}\right )}{\sqrt {a^{2} - a}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(1/(a*x^2+a-1),x, algorithm="giac")

[Out]

arctan(a*x/sqrt(a^2 - a))/sqrt(a^2 - a)

________________________________________________________________________________________

maple [A]  time = 0.01, size = 20, normalized size = 0.67 \[ \frac {\arctan \left (\frac {a x}{\sqrt {\left (a -1\right ) a}}\right )}{\sqrt {\left (a -1\right ) a}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(1/(a*x^2+a-1),x)

[Out]

1/((a-1)*a)^(1/2)*arctan(x*a/((a-1)*a)^(1/2))

________________________________________________________________________________________

maxima [F(-2)]  time = 0.00, size = 0, normalized size = 0.00 \[ \text {Exception raised: ValueError} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(1/(a*x^2+a-1),x, algorithm="maxima")

[Out]

Exception raised: ValueError >> Computation failed since Maxima requested additional constraints; using the 'a
ssume' command before evaluation *may* help (example of legal syntax is 'assume(a-1>0)', see `assume?` for mor
e details)Is a-1 positive or negative?

________________________________________________________________________________________

mupad [B]  time = 0.17, size = 23, normalized size = 0.77 \[ \frac {\mathrm {atan}\left (\frac {a\,x}{\sqrt {a^2-a}}\right )}{\sqrt {a^2-a}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(1/(a + a*x^2 - 1),x)

[Out]

atan((a*x)/(a^2 - a)^(1/2))/(a^2 - a)^(1/2)

________________________________________________________________________________________

sympy [B]  time = 0.17, size = 83, normalized size = 2.77 \[ - \frac {\sqrt {- \frac {1}{a \left (a - 1\right )}} \log {\left (- a \sqrt {- \frac {1}{a \left (a - 1\right )}} + x + \sqrt {- \frac {1}{a \left (a - 1\right )}} \right )}}{2} + \frac {\sqrt {- \frac {1}{a \left (a - 1\right )}} \log {\left (a \sqrt {- \frac {1}{a \left (a - 1\right )}} + x - \sqrt {- \frac {1}{a \left (a - 1\right )}} \right )}}{2} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(1/(a*x**2+a-1),x)

[Out]

-sqrt(-1/(a*(a - 1)))*log(-a*sqrt(-1/(a*(a - 1))) + x + sqrt(-1/(a*(a - 1))))/2 + sqrt(-1/(a*(a - 1)))*log(a*s
qrt(-1/(a*(a - 1))) + x - sqrt(-1/(a*(a - 1))))/2

________________________________________________________________________________________